package webEquipeRechercheGwt.client.handler.navigation;

import webEquipeRechercheGwt.client.abstractPanels.SeminarPanelAbstract;
import webEquipeRechercheGwt.client.entityMirror.SeminarMirror;
import webEquipeRechercheGwt.client.factory.WidgetFactory;
import webEquipeRechercheGwt.client.structure.DataShowingPanel;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;

public class ClickHandlerSeminar implements ClickHandler {

	SeminarMirror target;
	DataShowingPanel mainPanel;

	public ClickHandlerSeminar(SeminarMirror seminar, DataShowingPanel mainPanel){
		super();
		this.mainPanel = mainPanel;
		target = seminar;
	}
	
	@Override
	public void onClick(ClickEvent event) {
		SeminarPanelAbstract panel = WidgetFactory.getSeminarPanel(target, mainPanel);
		mainPanel.setCurrentPanel(panel);
	}
}
